package com.ykt.model;


import com.jfinal.plugin.activerecord.Page;

import java.util.Map;

/**
 * 代购费配置表
 */
public class AgentFee extends BaseModel<AgentFee> {
    private static final long serialVersionUID = 1L;

    public static final String community_id = "community_id";
    public static final String begin = "begin";
    public static final String end = "end";
    public static final String operator = "operator";
    public static final String fee = "fee";
    public static final String summary = "summary";

    public static AgentFee dao = new AgentFee();

    @Override
    public Page<AgentFee> paginate(int pageNumber, int rows, Map<String, String> paramMap) {
        String select = "SELECT c.name communityName,a.*";
        String exceptSelect = " FROM agent_fee a "
                + " LEFT JOIN community c ON a.community_id=c.id" ;

        String sqlOrderBy = " ORDER BY a.id DESC ";
        paramMap.put(OB, sqlOrderBy);

        return this.paginate(select, exceptSelect, pageNumber, rows, paramMap);
    }

}
